let fs = require('fs');
let buf = '';

process.stdin.on('readable', function() {
    let chunk = process.stdin.read();
    if (chunk) buf += chunk.toString();
});

process.stdin.on('end', function() {
    let v = buf.split("\n");
    let n = parseInt(v[0]), mod = v[1];
    let vv = [];
    for (let i = 2; i <= 13; ++i) vv.push(v[i].split(" ").map((x)=>{return parseFloat(x);}));
    if (mod === "S") {
        let sum = 0;
        for (let i = 0; i < 12; ++i) sum += vv[n][i];
        console.log(sum.toFixed(1));
    }
    else {
        let avg = 0;
        for (let i = 0; i < 12; ++i) avg += vv[n][i];
        console.log((avg/12).toFixed(1));
    }
    // console.log(vv);
});